﻿using System;
using System.Runtime.Serialization;

namespace Simp.Model.Exceptions
{
	/// <summary>Thrown when some parsing error occur.</summary>
	[Serializable()]
	public class ParsingException : SimpRuntimeException
	{
		/// <summary>Default constructor.</summary>
		public ParsingException()
			: base("Parsing error")
		{
		}

		/// <summary>Constructor taking a message.</summary>
		/// <param name="message"/>
		public ParsingException(string message)
			: base(message)
		{
		}

		/// <summary>Constructor taking a message and an inner exception.</summary>
		/// <param name="message"></param>
		/// <param name="inner"></param>
		public ParsingException(string message, Exception inner)
			: base(message, inner)
		{
		}

		/// <summary>Constructor needed for serialization when exception propagates from a remoting server to the client.</summary>
		/// <param name="info"></param>
		/// <param name="context"></param>
		protected ParsingException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}
	}
}